var prefix = "/yw/appraisalUser";

$('#recordAmount').on('input propertychange', function () {
    var money = $('#itemMoney').val();
    var amount = $('#recordAmount').val();
    var recordMoney = money * amount;
    $('#recordMoney').html(recordMoney + "元");
});


function save() {
    var amount = $('#recordAmount').val();
    if (amount <= 0) {
        layer.msg("指标数量不能小于1");
        return;
    }
    $.ajax({
        cache: true,
        type: "POST",
        url: prefix + "/recordEdit",
        data: $('#recordForm').serialize(), // 你的formid
        async: false,
        error: function (e) {
            console.log(e);
            parent.layer.alert("网络超时");
        },
        success: function (data) {
            if (data.code === 0) {
                parent.layer.msg("操作成功");
                parent.reLoad();
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);

            } else {
                parent.layer.alert(data.msg)
            }
        }
    });
}

